using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._StandardFeatureAnalysisTools._ManageData
{
    /// <summary>
    /// <para>Dissolve Boundaries</para>
    /// <para>Finds polygons that overlap or share a common boundary and merges them together to form a single polygon.</para>
    /// <para>查找重叠或共享公共边界的多边形，并将它们合并在一起以形成单个多边形。</para>
    /// </summary>    
    [DisplayName("Dissolve Boundaries")]
    public class DissolveBoundaries : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DissolveBoundaries()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputLayer">
        /// <para>Input Layer</para>
        /// <para>The layer containing polygon features that will be dissolved or combined.</para>
        /// <para>包含将要融合或合并的面要素的图层。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// </param>
        public DissolveBoundaries(object _inputLayer, object _outputName)
        {
            this._inputLayer = _inputLayer;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Standard Feature Analysis Tools";

        public override string ToolName => "Dissolve Boundaries";

        public override string CallName => "sfa.DissolveBoundaries";

        public override List<string> AcceptEnvironments => ["extent"];

        public override object[] ParameterInfo => [_inputLayer, _outputName, _dissolveFields, _summaryFields, _output];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The layer containing polygon features that will be dissolved or combined.</para>
        /// <para>包含将要融合或合并的面要素的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputLayer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Dissolve Fields</para>
        /// <para><xdoc>
        ///   <para>One or more fields from the input layer that control which polygons are merged. If you don't supply dissolve fields, polygons that share a common border (that is, they are adjacent) or polygon areas that overlap will be dissolved into one polygon.</para>
        ///   <para>If you do supply fields, polygons that share a common border and contain the same value in one or more fields will be dissolved. For example, if you have a layer of counties and each county has a State_Name attribute, you can dissolve boundaries using the State_Name attribute. Adjacent counties will be merged together if they have the same value for State_Name. The end result is a layer of state boundaries. If two or more fields are specified, the values in these fields must be the same for the boundary to be dissolved.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入图层中的一个或多个字段，用于控制合并哪些面。如果不提供溶解字段，则共享公共边界（即相邻）的多边形或重叠的多边形区域将融合到一个多边形中。</para>
        ///   <para>如果提供字段，则共享公共边界且在一个或多个字段中包含相同值的面将被溶解。例如，如果您有一个县图层，并且每个县都有一个 State_Name 属性，则可以使用 State_Name 属性来融合边界。如果相邻的县具有相同的State_Name值，则它们将合并在一起。最终结果是一层状态边界。如果指定了两个或多个字段，则这些字段中的值必须相同才能溶解边界。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _dissolveFields { get; set; } = null;


        /// <summary>
        /// <para>Summary Fields</para>
        /// <para><xdoc>
        ///   <para>A list of field names and statistical summary type that you wish to calculate for all points within each polygon. The count of points within each polygon is always returned. The following statistic types are supported:
        ///   <bulletList>
        ///     <bullet_item>Sum—The total value.  </bullet_item><para/>
        ///     <bullet_item>Minimum—The smallest value.  </bullet_item><para/>
        ///     <bullet_item>Max—The largest value.  </bullet_item><para/>
        ///     <bullet_item>Mean—The average or mean value.  </bullet_item><para/>
        ///     <bullet_item>Standard deviation—The standard deviation.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>要为每个面内的所有点计算的字段名称和统计汇总类型的列表。始终返回每个多边形内的点数。支持以下统计信息类型：
        ///   <bulletList>
        ///     <bullet_item>Sum - 总值。</bullet_item><para/>
        ///     <bullet_item>最小值 - 最小值。</bullet_item><para/>
        ///     <bullet_item>Max - 最大值。</bullet_item><para/>
        ///     <bullet_item>均值 - 平均值或平均值。</bullet_item><para/>
        ///     <bullet_item>标准差 （Standard deviation） - 标准差。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summaryFields { get; set; } = null;


        /// <summary>
        /// <para>Output</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        public DissolveBoundaries SetEnv(object extent = null)
        {
            base.SetEnv(extent: extent);
            return this;
        }

    }

}